import React, { Component } from 'react';
import Input from './input'

export default class InputDemo extends Component {
  constructor (props) {
    super(props)
    this.state = {
      value: 'asdasda'
    }
    this.onChange = this.onChange.bind(this)
  }
  onChange (val) {
    this.setState({
      value: val
    })
  }
  render () {
    return (
      <div>
        <Input value={this.state.value} onChange={this.onChange}></Input>
        <div>
          <b>
          {this.state.value}
          </b>
        </div>
      </div>
    )
  }
}